Retrospective analysis of medical records